package com.smartao.base.acl;

import org.springframework.transaction.annotation.Transactional;

import com.smartao.base.employee.Employee;
import com.smartao.core.orm.entity.BaseEntity;
import com.smartao.core.service.BaseService;

@Transactional(readOnly = true)
public interface PermissionService extends BaseService<AccessEntry,Long>{
	public <T extends BaseEntity<T>> Acl<?> getAclByEntity(T entity);
	public <T extends BaseEntity<T>> boolean isGranted(Employee user, T entity, Permission permission);
	//public boolean isGranted(BaseEntity entity, Employee user, Permission permission);
}
